﻿
@if(Request.IsAuthenticated) {
 <text>
    @if (HttpContext.Current.User.IsInRole("admin") || HttpContext.Current.User.IsInRole("editor"))
    {
        <li><a href="@Url.Action("Index", "Manager")">Hi, @HttpContext.Current.User.Identity.Name</a></li>
    }
    else
    {
        <li><a href="@Url.Action("Index", "Zone")">Hi, @HttpContext.Current.User.Identity.Name</a></li>
    }
    <li>@Html.ActionLink("注销", "LogOff", "Account")</li>
  </text>
}
else
{
   <li>@Html.ActionLink("登陆", "LogOn", "Account")</li>
}